package com.czx.dagger2demo;

import android.app.Application;
import android.util.Log;

/**
 * Created by codeczx on 2017/6/13.
 */

public class MyApp extends Application {
    private static final String TAG = "MyApp";
    private ApplicationComponent mApplicationComponent;
    private static MyApp mApplication;

    public static MyApp getInstance(){
        return mApplication;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        Log.e(TAG, "onCreate: ");
        mApplication = this;
        mApplicationComponent = DaggerApplicationComponent.create();
    }

    public ApplicationComponent getApplicationCOmponent(){
        return mApplicationComponent;
    }
}
